package com.cbn.ibcp.jishiting.media.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cbn.ibcp.common.annotation.DataSource;
import com.cbn.ibcp.common.enums.DataSourceType;
import com.cbn.ibcp.common.utils.PageUtils;
import com.cbn.ibcp.jishiting.media.bo.MediaEpisodeBO;
import com.cbn.ibcp.jishiting.media.mapper.MediaEpisodeMapper;
import com.cbn.ibcp.jishiting.media.service.IMediaEpisodeService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class MediaEpisodeServiceImpl implements IMediaEpisodeService {

    private final MediaEpisodeMapper mediaEpisodeMapper;


    @DataSource(DataSourceType.ibcp_media)
    @Override
    public List<MediaEpisodeBO> selectMediaEpisodeList(MediaEpisodeBO mediaEpisodeBO) {
        if (mediaEpisodeBO == null) {
            return null;
        }
        return mediaEpisodeMapper.selectMediaEpisodeWithMediaAlbum(mediaEpisodeBO);
    }
}
